home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / mmailp.idb / usr / lib / Zmail / bin / makeface.z / makeface
Encoding:
Text File  |  1997-01-22  |  988 b   |  30 lines

  1. :
  2. # makeface - Takes any Graphic File Format that pbmplus knows about
  3. # and generates Lines for .zmailrc to put an X-Face in all of your
  4. # outgoing Messages.
  5. #
  6. # Author: Felix Gaehtgens (felix@cs.uni-frankfurt.de)
  7. # Use it, abuse it, sell it - I couldn't care less ;-)
  8. if test "$#" != "1" ; then
  9.   echo "Usage: $0 <bitmap>"
  10.   echo "where <bitmap> can be gif, tiff, jpeg, xbm, sunrast,"
  11.   echo "or any other graphics file format that the pbmplus"
  12.   echo "toolkit supports".
  13.   exit 1
  14. fi
  15. if test -f $1 ; then
  16.   rm -f face.pbm face.xface
  17.   anytopnm $1 | ppmtopgm | pgmnorm | pnmscale -xy 48 48 | \
  18.   pgmtopbm > face.pbm
  19.   bla=`pnmfile face.pbm | awk '{ print $4}'`
  20.   fasel=`expr "(" 48 - $bla ")" / 2`
  21.   pbmmake -white 48 48 | pnmpaste face.pbm $fasel 0 | \
  22.   pbmtoicon | tail +3 | compface |  facetohdr > face.xface
  23.   echo "A file called face.xface has been generated. Please"
  24.   echo "append the contents of this file to your .zmailrc."
  25.   exit 0
  26. else
  27.   echo "$0: $1 not found.";
  28.   exit 1
  29. fi
  30.